import http from "@/http";
import type { SaveMenuParm, SysRole, SysRoleList } from "./RoleModel";


export const addApi = (data: SysRole) => {
  return http.post("/api/role/add", data);
};
export const getListApi = (params: SysRoleList) => {
  return http.get("/api/role/getList", params);
};
export const updateApi = (data: SysRole) => {
  return http.put("/api/role/update", data);
};
export const deleteApi = (id: string) => {
  return http.delete(`/api/role/${ id }`);
};
export const getDetailsApi=()=>{
  return http.get("/api/role/selectList")
}
export const assignApi=(data:SaveMenuParm)=>{
  return http.post("/api/role/saveRoleMenu",data)
}
